package com.yyz.lease.web.app.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yyz.lease.model.entity.PaymentType;
import com.yyz.lease.web.app.mapper.PaymentTypeMapper;
import com.yyz.lease.web.app.service.PaymentTypeService;
import com.yyz.lease.web.app.service.RoomPaymentTypeService;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @description 针对表【payment_type(支付方式表)】的数据库操作Service实现
 */
@Service
@RequiredArgsConstructor
public class PaymentTypeServiceImpl extends ServiceImpl<PaymentTypeMapper, PaymentType>
        implements PaymentTypeService {
    private final RoomPaymentTypeService roomPaymentTypeService;
    private final PaymentTypeMapper paymentTypeMapper;

    /**
     * 根据房间id获取可选支付方式列表
     */
    @Override
    public List<PaymentType> listByRoomId(Long id) {
        return paymentTypeMapper.selectPaymentTypesByRoomId(id);
    }
}




